<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>事件绑定</title>


</head>
<body>

    <div id="div">
        <div>{{name}}</div>
        <button v-on:click="change()">改变div的内容</button>
        <button v-on:dblclick="change()">改变div的内容</button>
        <input type="text" v-model="val">
        <div>{{val}}</div>
    </div>
<script src="js/vue.js"></script>
<script>
    new Vue({
       el:"#div",
        data:{
           name:"黑马程序员",
            val:"hhh"

        },
        methods:{
           change(){
               this.name="船只博客";
           }
        }
    });
</script>
</body>
</html>